package pl.olap.gui;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.Box;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.border.EmptyBorder;

public class Window extends JFrame {

	/** Glowne okno */
	private JPanel contentPane;
	private RightPanel r = null;
	private LeftPanel l = null;
	private SearchPanel s = null;
	private Box hBox = null;

	public Window() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 800, 600);
		setMinimumSize(new Dimension(800, 600));

		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(0, 0, 0, 0));
		contentPane.setLayout(new BorderLayout(0, 0));
		r = new RightPanel();
		l = new LeftPanel(r);
		s = new SearchPanel(l);
		
		JScrollPane rPane = new JScrollPane(r);
		JScrollPane lPane = new JScrollPane(l);
		JScrollPane sPane = new JScrollPane(s);
		
		hBox = Box.createHorizontalBox();
		hBox.add(lPane);
		hBox.add(rPane);

		contentPane.add(sPane, BorderLayout.NORTH);
		contentPane.add(hBox, BorderLayout.CENTER);

		this.add(contentPane);

	}
}
